// 引入Vue
import { createApp } from 'vue'
// 引入Pinia
import { createPinia } from 'pinia'
import piniaPluginPersistedstate from 'pinia-plugin-persistedstate'
// 引入day.js
import dayjs from 'dayjs'
import 'dayjs/locale/zh-cn'
import LocalizedFormat from 'dayjs/plugin/localizedFormat'
import rTime from 'dayjs/plugin/relativeTime'
// 引入前端路由
import App from './App.vue'
import router from './router'
// 导入tailwindcss和daisyui样式
import './style.css'

// 创建Vue App
const app = createApp(App)

// 配置day.js
dayjs.locale('zh-cn')
dayjs.extend(rTime)
dayjs.extend(LocalizedFormat)

// 创建Pinia
const pinia = createPinia()
pinia.use(piniaPluginPersistedstate)

// 安装插件
app.use(pinia)
app.use(router)

// 挂载应用
app.mount('#app')
